{* Smarty *}
<!-- Add Section -->
<div class="box">
  <table cellspacing="0">
    <caption>{t}caption add section{/t}</caption>
    <tr>
      <th colspan="2">{t}add section{/t}</th>
    </tr>
    <tr>
      {if isset($result)}
      <td class="success"><a class="success" href="{$smarty.server.PHP_SELF}">{t}section added{/t}</a></td>
      {else}
      <td class="form">
        <form {$form_data.attributes}>
          <table class="form">
            <tr>
              <td class="form">{$form_data.section.label}</td><td class="form">{$form_data.section.html}</td>
            </tr>
            <tr>
              <td class="form">{$form_data.alias.label}</td><td class="form">{$form_data.alias.html}</td>
            </tr>
            <tr>
              <td class="form">{$form_data.description.label}</td><td class="form">{$form_data.description.html}</td>
            </tr>
            <tr>
              <td colspan="2" class="right">{$form_data.btn_Submit.label}{$form_data.btn_Submit.html}</td>
            </tr>
            <tr>
              <td colspan="2" class="center">{$form_data.requirednote}</td>
            </tr>
          </table>
        </form>
      </td>
      {/if}
    </tr>
  </table>
</div>
<!-- List Sections -->
{if !empty($sections)}
<div class="box">
  <table cellspacing="0">
    <caption>{t}caption list sections{/t}</caption>
    <tr>
      <th width="90%" class="left">{t}sections{/t}/<small>{t}alias{/t}/<i>{t}description{/t}</i></small></th>
      <th width="10%" class="left">{t}options{/t}</th>
    </tr>
    {if isset($sections_path)}
    <tr>
      <th colspan="3" class="path_top"><small>> /{$sections_path}/</small></th>
    </tr>
    {/if}
    {foreach from=$sections item=node name=section}
    <tr>
      {if $node.level == 0}
      <td width="60%" class="left" valign="top"><b>{$node.name|upper}</b>{if $node.alias}<br/>{$node.alias}{/if}{if $node.description}<br/><small><i>{$node.description|truncate}</i></small>{/if}</td>
      {else}
      <td width="60%" class="left" valign="top">{$node.name|indent:$node.level:"&nbsp;&nbsp;&nbsp;&nbsp;"}{if $node.alias}<br/>{$node.alias|indent:$node.level:"&nbsp;&nbsp;&nbsp;&nbsp;"}{/if}{if $node.description}<br/><small><i>{$node.description|indent:$node.level:"&nbsp;&nbsp;&nbsp;&nbsp;"}</i></small>{/if}</td>
      {/if}
      <td width="10%" valign="top">
        {html_image file="/themes/$template/images/add-node.png" border="0" href="/sections/addnode/`$node.id`"}&nbsp;&nbsp;
        {html_image file="/themes/$template/images/edit.gif" border="0" href="/sections/modify/`$node.id`"}&nbsp;&nbsp;
        {html_image file="/themes/$template/images/delete.gif" border="0" href="/sections/delete/`$node.id`"}
      </td>
     </tr>
    {/foreach}
    {if isset($sections_path)}
    <tr>
      <th colspan="3" class="path_bottom"><small>> /{$sections_path}/</small></th>
    </tr>
    {/if}
  </table>
</div>
{/if}